Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests to verify incoming event type handler works #269

Merged
merged 6 commits into from
Oct 4, 2019

Conversation

seratch
Copy link
Member

@seratch seratch commented Oct 1, 2019

Summary

This pull request adds a new test which verifies if handling incoming events works as expected. As you can see, Bolt now accepts view_submission added by #261 while it cannot handle view_closed yet.

Requirements (place an x in each [ ])

@codecov
Copy link

codecov bot commented Oct 1, 2019

Codecov Report

Merging #269 into master will increase coverage by 10.24%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #269       +/-   ##
===========================================
+ Coverage   62.24%   72.48%   +10.24%     
===========================================
  Files           7        7               
  Lines         498      498               
  Branches      138      138               
===========================================
+ Hits          310      361       +51     
+ Misses        163      105       -58     
- Partials       25       32        +7
Impacted Files Coverage Δ
src/helpers.ts 92.3% <0%> (+7.69%) ⬆️
src/App.ts 81.48% <0%> (+9.87%) ⬆️
src/middleware/builtin.ts 61.83% <0%> (+17.55%) ⬆️
src/middleware/process.ts 87.5% <0%> (+31.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31675ec...c4d8d8b. Read the comment docs.

@seratch seratch changed the title Add a test to verify incoming event types handler's behaviors Add tests to verify incoming event type handler works Oct 2, 2019
@seratch
Copy link
Member Author

seratch commented Oct 2, 2019

I've added more patterns in the second commit. The test coverage has been much improved 🙌

##           master     #269       +/-   ##
===========================================
+ Coverage   59.95%   70.32%   +10.36%     

respond: noop,
ack: noop,
},
// TODO: https://github.com/slackapi/bolt/issues/263
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shanedewael How about merging this PR before #276 and removing these comments out to verify your change works?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is a good idea!

app.action({ callback_id: 'message_action_callback_id' }, ({ }) => { actionFn(); })
app.action({ callback_id: 'interactive_message_callback_id' }, ({ }) => { actionFn(); })
app.action({ callback_id: 'dialog_submission_callback_id' }, ({ }) => { actionFn(); })
app.view('view_callback_id', ({ }) => { viewFn(); })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add one for view_cancel? I can do this when we merge this before my branch lands.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shanedewael yes, we need to have it. I haven't added the one commented out yet as we didn't decide the design at that time.

@shaydewael shaydewael merged commit 54bf827 into slackapi:master Oct 4, 2019
@seratch seratch deleted the tests-for-incoming-event-types branch June 20, 2020 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants